As a conventional thermal flow-rate sensor, there is a flow-rate sensor such as described in Patent Document 1, for example. In other words, this thermal flow-rate sensor includes a first temperature sensor, a heat-transfer element, and a second temperature sensor. The first temperature sensor detects the temperature of a measurement medium that flows inside a pipe by detecting the temperature of the pipe. Moreover, the heat-transfer element is arranged further on the downstream side in the direction of flow of the measurement medium than the first temperature sensor, and exchanges heat with the measurement medium (pipe). The second temperature sensor detects the temperature of the outside air. So as not to be affected by the temperature of a portion that exchanges heat with the heat-transfer element inside the pipe, the first temperature sensor is arranged so as to be sufficiently separated from the heat-transfer element.
In this kind of thermal flow-rate sensor, the temperature of the outside air is detected by the second temperature sensor, and the heat flux between the heat-transfer element and the pipe is calculated based on the temperature of the outside air.